package tuioZones;

import processing.core.PApplet;

public class TouchZone2{
	int x, y, x0, y0, xi, yi, r, h, w, r0, h0, w0, ri, hi, wi, vx, vy, cx,
			cy, primePoint = -999, friction, touches = 0, releaseTime = 0;
	int width;
	int height;
	public float angle = (float) 0.01;
	boolean rectangle, circle, gravity = false,
			scalable = false, hSwipeable = false, throwable = false;
	
	String name;

	float scl = 1.0f,scli = 1.0f;

	TouchZone2(String zNameIn, int xIn, int yIn, int rIn) {
		name = zNameIn;
		// variables followed by 0 are the original values
		// variables followed by i are intermediate values for a historical
		// reference
		x0 = xi = x = xIn;// center of zone x
		y0 = yi = y = yIn;// center of zone y
		r0 = ri = r = rIn;// radius of circle boundary
		w0 = wi = w = 2 * rIn;// width of the square the circle inscribes
		h0 = hi = h = 2 * rIn;// height of the square the circle inscribes
		vx = vy = 0;// velocities
		cx = x;// centerline x
		cy = y;// centerline y
		circle = true;
		rectangle = false;
	}

	TouchZone2(String zNameIn, int xIn, int yIn, int wIn, int hIn) {
		name = zNameIn;
		x0 = xi = x = xIn;// upper left corner x
		y0 = yi = y = yIn;// upper left corner y
		w0 = wi = w = wIn;// width
		h0 = hi = h = hIn;// width
		r0 = ri = r = (int) PApplet.sqrt(PApplet.pow(hIn, 2)
				+ PApplet.pow(wIn, 2)) / 2;
		vx = vy = 0;// velocities
		cx = x + w / 2;
		cy = y + h / 2;
		circle = false;
		rectangle = true;
	}

	public float getRotationAngle() {
		return angle;
	}

	public PointXY getTranslationPoint() {
		return null;
	}
	
	public void rotate(float newangle) {
		
	}
	
	
}
